<script type="text/javascript" src="module/mod_kecamatan/js/cetak_kabupaten.js"></script>

<div id=tiga_ba>
	<div id=tiga_baa>Cetak Daftar Kecamatan</div>
	<div id=tiga_bab></div>
	<div class=clear></div>
</div>
            
<form action="module/mod_kecamatan/cetak.php" method="post" enctype="multipart/form-data">
	<table style="margin: 10px 15px 10px 15px;">
		<tr>
			<td>Provinsi</td>
			<td>
				<select name="provinsi" id="provinsi" class="input2">
					<?php
						$provinsi = mysql_query("select * from propinsi where aktif = 'Y' order by propinsi");
						echo "<option value='all'> - - Cetak Dari Semua Provinsi - -</option>";
						while($p = mysql_fetch_array($provinsi)){
							if($p['id_propinsi']=='64'){
								$s = "selected";
							}else{
								$s = "";
							}
							echo "<option value='$p[id_propinsi]' $s>$p[propinsi]</option>";
						}
					?>
				</select>
			</td>
		</tr>
		<tr>
			<td>Kabupaten</td>
			<td>
				<select name="kabupaten" id="kabupaten" class="input2">
					<?php
						$kabupaten = mysql_query("select * from kabupaten k inner join propinsi p on k.id_propinsi = p.id_propinsi where k.id_propinsi=64 and k.aktif='Y' order by k.kabupaten");
						while($k = mysql_fetch_array($kabupaten)){
							if($k['id_kabupaten']=='6405'){
								$s = "selected";
							}else{
								$s = "";
							}
							echo "<option value='$k[id_kabupaten]' $s>$k[kabupaten]</option>";
						}
					?>
				</select>
			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td><input name="submit" type="submit" class="button" value="Cetak" /></td>
		</tr>
	</table>                
</form>		
            
        